package org.bluweb.g4wicket.map.service;

import java.util.List;

import org.bluweb.g4wicket.map.Location;


public class GeocodingResponse {

	public static class Result {

		public List<String> types;
		public String formatted_address;
		public List<Address> address_components;
		public Geometry geometry;
	}

	public static class Address {
		
		public String long_name;
		public String short_name; 
		public List<String> types;
	}

	public static class Geometry {
		
		public Location location;
		public String location_type;
		public Viewport viewport;
	}
	
	public static class Viewport {
		
		public Location southwest;
		public Location northeast;
	}
	
	public String status;
	public List<Result> results;
	
	public GeocodingResponse() {
	}
	
	public GeocodingResponse(String status, List<Result> results) {
		this.status = status;
		this.results = results;
	}

	public Location getLocation() {
		return this.results.get(0).geometry.location;
	}
}
